using System;
using System.ComponentModel;
using System.ComponentModel.Design.Serialization;
using System.ComponentModel.Design;

namespace Widgetsphere.Generator.Design.Editors
{
	internal class CustomAggregateColumnCollectionEditor : System.Drawing.Design.UITypeEditor
	{
		public CustomAggregateColumnCollectionEditor()
		{
		}

		public override System.Drawing.Design.UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
		{
			return System.Drawing.Design.UITypeEditorEditStyle.Modal;
		}

    public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
    {
      try
      {
				//System.Windows.Forms.Design.IWindowsFormsEditorService edSvc = (System.Windows.Forms.Design.IWindowsFormsEditorService)provider.GetService(typeof(System.Windows.Forms.Design.IWindowsFormsEditorService));
				//Widgetsphere.Generator.Forms.CustomAggregateColumnCollectionForm F = new Widgetsphere.Generator.Forms.CustomAggregateColumnCollectionForm();
				//if(edSvc.ShowDialog(F) == System.Windows.Forms.DialogResult.OK)
				//{
				//  context.OnComponentChanged();
				//}
      }
      catch(Exception ex) { }
      return value;
    }

	}
}
